package geradatawarehouse.dao.oracle;

import geradatawarehouse.bean.AlunoEJA;
import geradatawarehouse.dao.oracle.abs.AbstractAlunoOracleDAO;

import java.io.IOException;
import java.sql.SQLException;

public class AlunoEJAOracleDAO extends AbstractAlunoOracleDAO<AlunoEJA> {

	private static final String ALUNO_EJA_SQL = "aluno_eja.sql";

	public AlunoEJAOracleDAO(final int anoSem) throws IOException {
		super(anoSem, AlunoEJAOracleDAO.ALUNO_EJA_SQL);
	}

	@Override
	public AlunoEJA next() throws SQLException {
		AlunoEJA a = null;
		if (this.resultSet.next()) {
			a = new AlunoEJA();
			this.fillAbstractAluno(a);
			a.setSegmento(this.resultSet.getInt("SEGMENTO"));
			a.setSemestre(this.resultSet.getInt("SEMESTRE"));
		}

		return a;
	}
}
